x = eval(input('请输入收入:'))
n = x-5000
if n<0:
    cost = 0
elif n <= 1500:
    cost = n*0.03
elif n<=4500:
    cost = (n-1500)*0.1+45
elif n<=9000:
    cost = (n-4500)*0.2+345
elif n<=35000:
    cost = (n-9000)*0.25+1245
elif n<=55000:
    cost = (n-35000)*0.3+7745
elif n<=80000:
    cost = (n-55000)*0.35+14245
elif n>80000:
    cost = (n-80000)*0.45+26990
print('应缴{:.2f}'.format(cost))
    